<template>
  <div class="minemanage">
    <el-divider content-position="left">基本信息</el-divider>
    <el-form ref="form" :model="form" label-width="210px">
      <el-row>
        <el-col :span="8">
          <el-form-item label="煤矿名称" prop="csMineName">
            <el-input v-model="form.csMineName" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="煤矿代码键" prop="csMineCode">
            <el-input
              v-model="form.csMineCode"
              :disabled="disabled"
              readonly=""
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="煤矿地址" prop="mineAdress">
            <el-input
              v-model="form.mineAdress"
              :disabled="disabled"
              readonly=""
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="联系方式" prop="csMinePhone">
            <el-input
              v-model="form.csMinePhone"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="监管单位" prop="mineSjqymc">
            <el-input v-model="form.mineSjqymc" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="经济类型" prop="mineJjlx">
            <el-input v-model="form.mineJjlx" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <!-- <el-col :span="8">
          <el-form-item label="矿井日产量" prop="csCapacityDay">
            <el-input
              v-model="form.csCapacityDay"
              :disabled="disabled"
              style="width: 82%"
            ></el-input>
            <span class="lump">吨</span>
          </el-form-item>
        </el-col> -->
        <el-col :span="8">
          <el-form-item label="总储量" prop="totalReserves">
            <el-input
              v-model="form.totalReserves"
              :disabled="disabled"
              style="width: 82%"
            ></el-input>
            <span class="lump">万吨</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="年销量" prop="csSalesVolume">
            <el-input
              v-model="form.csSalesVolume"
              :disabled="disabled"
              style="width: 82%"
            ></el-input>
            <span class="lump">万吨</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="设计年产量" prop="yearPlan">
            <el-input
              v-model="form.yearPlan"
              :disabled="disabled"
              style="width: 82%"
            ></el-input>
            <span class="lump">万吨</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="核定产能" prop="csCapacityAnnual">
            <el-input
              v-model="form.csCapacityAnnual"
              :disabled="disabled"
              style="width: 82%"
            ></el-input>
            <span class="lump">万吨</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="实际生产能力" prop="csCapacityReal">
            <el-input
              v-model="form.csCapacityReal"
              :disabled="disabled"
              style="width: 82%"
            ></el-input>
            <span class="lump">万吨</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="计划开拓尺寸" prop="planKtMeter">
            <el-input
              v-model="form.planKtMeter"
              :disabled="disabled"
              style="width: 82%"
            ></el-input>
            <span class="lump">米</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="计划掘进尺寸" prop="planJjMeter">
            <el-input
              v-model="form.planJjMeter"
              :disabled="disabled"
              style="width: 82%"
            ></el-input>
            <span class="lump">米</span>
          </el-form-item>
        </el-col>
        <!-- <el-col :span="8">
          <el-form-item label="当月计划产量" prop="curMonthPlan">
            <el-input
              v-model="form.curMonthPlan"
              :disabled="disabled"
               style="width: 82%"
            ></el-input>
             <span class="lump">万吨</span>
          </el-form-item>
        </el-col> -->
        <!-- <el-col :span="8">
          <el-form-item label="上月计划产量" prop="lastMonthPlan">
            <el-input
              v-model="form.lastMonthPlan"
              :disabled="disabled"
               style="width: 82%"
            ></el-input>
            <span class="lump">万吨</span>
          </el-form-item>
        </el-col> -->
        <el-col :span="8">
          <el-form-item label="剩余储量" prop="remainingReserves">
            <el-input
              v-model="form.remainingReserves"
              :disabled="disabled"
              style="width: 82%"
            ></el-input>
            <span class="lump">万吨</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="营业执照号" prop="mineYyzzCode">
            <el-input
              v-model="form.mineYyzzCode"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="营业执照有效期" prop="mineYyzzLimitDate">
            <el-date-picker
              v-model="form.mineYyzzLimitDate"
              :disabled="disabled"
              type="date"
              placeholder="选择日期"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              style="width:100%"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="公司邮箱" prop="email">
            <el-input v-model="form.email" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="安全生产标准化级别" prop="securityLevel">
            <el-input
              v-model="form.securityLevel"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-divider content-position="left">安全管理信息</el-divider>
      <el-row>
        <el-col :span="8">
          <el-form-item label="采矿许可证号" prop="licenceCode">
            <el-input
              v-model="form.licenceCode"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="采矿许可证状态" prop="licenceState">
            <el-input
              v-model="form.licenceState"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="采矿许可证有效期" prop="licenceLimitDate">
             <el-date-picker
              v-model="form.licenceLimitDate"
              :disabled="disabled"
              type="date"
              placeholder="选择日期"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              style="width:100%"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="安全生产许可证号" prop="mineAqscxkzCode">
            <el-input
              v-model="form.mineAqscxkzCode"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item
            label="安全生产许可证有效期"
            prop="mineAqscxkzLimitDate"
          >
            <el-date-picker
              v-model="form.mineAqscxkzLimitDate"
              :disabled="disabled"
              type="date"
              placeholder="选择日期"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              style="width:100%"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="煤炭生产许可证号" prop="mineMtscxkz">
            <el-input
              v-model="form.mineMtscxkz"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item
            label="煤炭生产许可证有效期"
            prop="mineMtscxkzLimitDate"
          >
            <el-date-picker
              v-model="form.mineMtscxkzLimitDate"
              :disabled="disabled"
              type="date"
              placeholder="选择日期"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              style="width:100%"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-divider content-position="left">人员管理信息</el-divider>
      <el-row>
        <el-col :span="12">
          <el-form-item label="矿长姓名" prop="managerName">
            <el-input
              v-model="form.managerName"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="矿长资格证号" prop="managerZgzh">
            <el-input
              v-model="form.managerZgzh"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="矿长安全生产许可资格证号" prop="managerAqxkz">
            <el-input
              v-model="form.managerAqxkz"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item
            label="矿长安全生产许可资格证有效期"
            prop="managerAqxkzLimitDate"
          >
            <el-date-picker
              v-model="form.managerAqxkzLimitDate"
              :disabled="disabled"
              type="date"
              placeholder="选择日期"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              style="width:100%"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="职工人数" prop="csWorkersTotal">
            <el-input
              v-model="form.csWorkersTotal"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="大专人数" prop="juniorCollege">
            <el-input
              v-model="form.juniorCollege"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="本科及以上人数" prop="undergraduate">
            <el-input
              v-model="form.undergraduate"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="井下从业人数" prop="underground">
            <el-input
              v-model="form.underground"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="测尘人员总数" prop="dustDetector">
            <el-input
              v-model="form.dustDetector"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="采样器数量" prop="sampler">
            <el-input v-model="form.sampler" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-divider content-position="left">矿井信息</el-divider>
      <el-row>
        <el-col :span="8">
          <el-form-item label="开采年限" prop="miningDuration">
            <el-input
              v-model="form.miningDuration"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="井田面积" prop="csMineField">
            <el-input
              v-model="form.csMineField"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="现采煤层" prop="coalRake">
            <el-input v-model="form.coalRake" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="可采煤层" prop="coalSeam">
            <el-input v-model="form.coalSeam" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="正常涌水量" prop="normalWaterInflow">
            <el-input
              v-model="form.normalWaterInflow"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="最大涌水量" prop="maximumWaterInflow">
            <el-input
              v-model="form.maximumWaterInflow"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="开拓方式" prop="developmentForm">
            <el-input
              v-model="form.developmentForm"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="X位置" prop="locationX">
            <el-input v-model="form.locationX" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="Y位置" prop="locationY">
            <el-input v-model="form.locationY" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="水文信息" prop="hydrology">
            <el-input v-model="form.hydrology" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="地质信息" prop="geology">
            <el-input v-model="form.geology" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="井筒名称" prop="pitshaftName">
            <el-input
              v-model="form.pitshaftName"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="井筒编码" prop="pitshaftCode">
            <el-input
              v-model="form.pitshaftCode"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="工作面名称" prop="faceName">
            <el-input v-model="form.faceName" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="工作面代码" prop="faceCode">
            <el-input v-model="form.faceCode" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-divider content-position="left">瓦斯信息</el-divider>
      <el-row>
        <el-col :span="8">
          <el-form-item label="矿井瓦斯等级" prop="csGasLevel">
            <el-input v-model="form.csGasLevel" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="绝对瓦斯涌出量" prop="csGasAbs">
            <el-input v-model="form.csGasAbs" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="相对瓦斯涌出量" prop="csGasCom">
            <el-input v-model="form.csGasCom" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="瓦斯抽采利用制度" prop="gasDrainage">
            <el-input
              v-model="form.gasDrainage"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="抽放方式" prop="pumping">
            <el-input v-model="form.pumping" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-divider content-position="left">防治水管理信息</el-divider>
      <el-row>
        <el-col :span="8">
          <el-form-item label="主/副水仓容量" prop="mainCapacity">
            <el-input
              v-model="form.mainCapacity"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="水泵台数" prop="waterPumpNum">
            <el-input
              v-model="form.waterPumpNum"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="水泵型号" prop="waterPumpModel">
            <el-input
              v-model="form.waterPumpModel"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="排水管路数量" prop="shootNum">
            <el-input v-model="form.shootNum" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="排水管路直径" prop="shootDiam">
            <el-input v-model="form.shootDiam" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="排水管路长度" prop="shootLong">
            <el-input v-model="form.shootLong" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="排水管路描述" prop="shootDescribe">
            <el-input
              v-model="form.shootDescribe"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="每日排水量" prop="dailyDisplacement">
            <el-input
              v-model="form.dailyDisplacement"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="物探设备台数" prop="equipmentNum">
            <el-input
              v-model="form.equipmentNum"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="物探设备型号" prop="equipmentModel">
            <el-input
              v-model="form.equipmentModel"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="钻探设备台数" prop="drillingEquipmentNum">
            <el-input
              v-model="form.drillingEquipmentNum"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="钻探设备型号" prop="drillingEquipmentModel">
            <el-input
              v-model="form.drillingEquipmentModel"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-divider content-position="left">各子系统基础建设信息</el-divider>
      <el-row>
        <el-col :span="8">
          <el-form-item label="安全监测系统：厂家名称" prop="safeFactoryName">
            <el-input
              v-model="form.safeFactoryName"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="建设时间" prop="safeTime">
            <el-date-picker
              v-model="form.safeTime"
              :disabled="disabled"
              type="date"
              placeholder="选择日期"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              style="width:100%"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="联系方式" prop="safePhone">
            <el-input v-model="form.safePhone" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="人员监测系统：厂家名称" prop="personFactoryName">
            <el-input
              v-model="form.personFactoryName"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="建设时间" prop="personTime">
            <el-date-picker
              v-model="form.personTime"
              :disabled="disabled"
              type="date"
              placeholder="选择日期"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              style="width:100%"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="联系方式" prop="personPhone">
            <el-input
              v-model="form.personPhone"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="产量监测系统：厂家名称" prop="yieldFactoryName">
            <el-input
              v-model="form.yieldFactoryName"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="建设时间" prop="yieldTime">
             <el-date-picker
              v-model="form.yieldTime"
              :disabled="disabled"
              type="date"
              placeholder="选择日期"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              style="width:100%"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="联系方式" prop="yieldPhone">
            <el-input v-model="form.yieldPhone" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="视频监测系统：厂家名称" prop="videoFactoryName">
            <el-input
              v-model="form.videoFactoryName"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="建设时间" prop="videoTime">
            <el-date-picker
              v-model="form.videoTime"
              :disabled="disabled"
              type="date"
              placeholder="选择日期"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              style="width:100%"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="联系方式" prop="videoPhone">
            <el-input v-model="form.videoPhone" :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item
            label="水害防治系统：厂家名称"
            prop="shuiwenFactoryName"
          >
            <el-input
              v-model="form.shuiwenFactoryName"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="建设时间" prop="shuiwenTime">
            <el-date-picker
              v-model="form.shuiwenTime"
              :disabled="disabled"
              type="date"
              placeholder="选择日期"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              style="width:100%"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="联系方式" prop="shuiwenPhone">
            <el-input
              v-model="form.shuiwenPhone"
              :disabled="disabled"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item align="center">
        <el-button type="primary" @click="define">确定</el-button>
        <el-button type="button" @click="modify">修改</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import { listMine, updateMine } from "@/api/mine/minemanage";
export default {
  data() {
    return {
      form: {},
      disabled: true
    };
  },
  methods: {
    getmanage() {
      this.disabled = true;
      listMine().then(response => {
        this.form = response.rows[0];
      });
    },
    modify() {
      this.disabled = false;
    },
    define() {
      updateMine(this.form).then(response => {
        this.msgSuccess("修改成功");
        this.getmanage();
        this.disabled = true;
      });
    }
  },
  created() {
    this.getmanage();
  }
};
</script>

<style lang="scss" scoped>
.minemanage {
  box-sizing: border-box;
  padding: 40px 30px;
  ::v-deep .el-input--medium .el-input__inner {
    height: 50px !important;
    line-height: 50px !important;
  }
  ::v-deep .el-form-item--medium .el-form-item__label {
    line-height: 50px;
  }
  .lump {
    width: 16%;
    display: inline-block;
    text-align: center;
    border: 1px solid #dfe4ed;
    border-radius: 4px;
    height: 50px;
    line-height: 50px;
    margin-left: 2%;
    background: #f5f7fa;
    color: #c0c4cc;
  }
}
</style>
